﻿using _2._23._2015_GroceryList.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using _2._23._2015_GroceryList;

namespace _2._23._2015_GroceryList.Controllers
{
    [Authorize(Roles="Admin")]
    public class apiAdminController : ApiController
    {
        private GroceryItemViewModel _model;
        public IHttpActionResult Get()
        {
            try
            {
                string mySentence = "Hello how are you";
                int wordCount = mySentence.WordCount();

                //_model.ItemName = "candy";
                return Ok(wordCount);
            }
            catch (Exception ex)
            {
                
                return Ok("This thing blew up!");
            }
            
            //return Ok(_model);
        }
    }
}
